
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Groovy教程  · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="groovyBase.html" />
    
    
    <link rel="prev" href="../chapter-Grinder/nGrinderdevelop/" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../chapter-IDEA/">
            
                <a href="../chapter-IDEA/">
            
                    
                    IDEA系列教程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../chapter-IDEA/understandbase.html">
            
                <a href="../chapter-IDEA/understandbase.html">
            
                    
                     IDEA基本知识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="../chapter-IDEA/advance/section1.1.1.html">
            
                <a href="../chapter-IDEA/advance/section1.1.1.html">
            
                    
                     开发流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2" data-path="../chapter-IDEA/advance/section1.1.2.html">
            
                <a href="../chapter-IDEA/advance/section1.1.2.html">
            
                    
                     最常用的快捷键
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.3" data-path="../chapter-IDEA/advance/section1.1.3.html">
            
                <a href="../chapter-IDEA/advance/section1.1.3.html">
            
                    
                     搜索技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.4" data-path="../chapter-IDEA/advance/section1.1.4.html">
            
                <a href="../chapter-IDEA/advance/section1.1.4.html">
            
                    
                     同步设置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.5" data-path="../chapter-IDEA/advance/section1.1.5.html">
            
                <a href="../chapter-IDEA/advance/section1.1.5.html">
            
                    
                     如何迅速掌握快捷键
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../chapter-IDEA/upIDEA.html">
            
                <a href="../chapter-IDEA/upIDEA.html">
            
                    
                     IDEA进阶
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="../chapter-IDEA/upIDEA/section1.2.1.html">
            
                <a href="../chapter-IDEA/upIDEA/section1.2.1.html">
            
                    
                     在IDEA上配置Github
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="../chapter-IDEA/upIDEA/section1.2.2.html">
            
                <a href="../chapter-IDEA/upIDEA/section1.2.2.html">
            
                    
                    另类语法糖-Postfix Completion
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3" data-path="../chapter-IDEA/upIDEA/section1.2.3.html">
            
                <a href="../chapter-IDEA/upIDEA/section1.2.3.html">
            
                    
                    IDEA 插件实践谈
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../chapter-GITBOOK/">
            
                <a href="../chapter-GITBOOK/">
            
                    
                    GIT BOOK
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter-GITBOOK/gitbookbase/">
            
                <a href="../chapter-GITBOOK/gitbookbase/">
            
                    
                     GIT BOOK基本配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" data-path="../chapter-GITBOOK/gitbookbase/gitbook-base.html">
            
                <a href="../chapter-GITBOOK/gitbookbase/gitbook-base.html">
            
                    
                    环境配置及本地调试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter-GITBOOK/gitbookadvance/">
            
                <a href="../chapter-GITBOOK/gitbookadvance/">
            
                    
                     GIT BOOK同步GitHub
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../chapter-Grinder/">
            
                <a href="../chapter-Grinder/">
            
                    
                    nGrinder 压测工具安装及使用 
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter-Grinder/nGrinderbase/">
            
                <a href="../chapter-Grinder/nGrinderbase/">
            
                    
                     nGrinder 基本配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1.1" data-path="../chapter-Grinder/nGrinderbase/section3.1.1.html">
            
                <a href="../chapter-Grinder/nGrinderbase/section3.1.1.html">
            
                    
                     nGrinder安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.2" data-path="../chapter-Grinder/nGrinderbase/section3.1.2.html">
            
                <a href="../chapter-Grinder/nGrinderbase/section3.1.2.html">
            
                    
                     nGrinder agent配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.3" data-path="../chapter-Grinder/nGrinderbase/section3.1.3.html">
            
                <a href="../chapter-Grinder/nGrinderbase/section3.1.3.html">
            
                    
                     nGrinder 压测任务预约
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../chapter-Grinder/nGrinderdevelop/">
            
                <a href="../chapter-Grinder/nGrinderdevelop/">
            
                    
                     nGrinder 脚本开发
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="1.5" data-path="./">
            
                <a href="./">
            
                    
                    Groovy教程 
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="groovyBase.html">
            
                <a href="groovyBase.html">
            
                    
                    Groovy基础指南 
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="gradleBase.html">
            
                <a href="gradleBase.html">
            
                    
                    Gradle基础指南 
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../chapter-WEBTools/">
            
                <a href="../chapter-WEBTools/">
            
                    
                    Web 开发常用工具 
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../chapter-WEBTools/Postman.html">
            
                <a href="../chapter-WEBTools/Postman.html">
            
                    
                    Postman实践谈 
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../chapter-WEBTools/fiddler.html">
            
                <a href="../chapter-WEBTools/fiddler.html">
            
                    
                    Fiddler的使用技巧 
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../chapter-tittleTattle/">
            
                <a href="../chapter-tittleTattle/">
            
                    
                    一点思考 
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../chapter-tittleTattle/InputOutput.html">
            
                <a href="../chapter-tittleTattle/InputOutput.html">
            
                    
                     从函数的输入输出看编程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../chapter-tittleTattle/MysqlAndRedis.html">
            
                <a href="../chapter-tittleTattle/MysqlAndRedis.html">
            
                    
                     MySQL和Redis的有趣对话
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../chapter-tittleTattle/whoCareMyCode.html">
            
                <a href="../chapter-tittleTattle/whoCareMyCode.html">
            
                    
                     代码到底写给谁看
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../chapter-tittleTattle/iamengineer.html">
            
                <a href="../chapter-tittleTattle/iamengineer.html">
            
                    
                     我是一个后端
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../chapter-thinking/">
            
                <a href="../chapter-thinking/">
            
                    
                    杂谈 
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../chapter-thinking/personalization.html">
            
                <a href="../chapter-thinking/personalization.html">
            
                    
                     人格化的产品
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../chapter-thinking/ifIWereALineOfCode.html">
            
                <a href="../chapter-thinking/ifIWereALineOfCode.html">
            
                    
                     假如我是一行代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../chapter-thinking/saleYourIdea.html">
            
                <a href="../chapter-thinking/saleYourIdea.html">
            
                    
                     卖掉你的想法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Groovy教程 </a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="groovy&#x6559;&#x7A0B;">Groovy&#x6559;&#x7A0B;</h1>
<h3 id="&#x524D;&#x8A00;">&#x524D;&#x8A00;</h3>
<p>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;Java&#x5B9E;&#x9645;&#x4E0A;&#x5DF2;&#x7ECF;&#x6709;&#x7740;&#x975E;&#x5E38;&#x4E30;&#x5BCC;&#x7684;&#x751F;&#x6001;&#x7CFB;&#x7EDF;&#xFF0C;&#x800C;Groovy&#x8FD9;&#x79CD;&#x57FA;&#x4E8E;Jvm&#x7684;&#x52A8;&#x6001;&#x811A;&#x672C;&#x8BED;&#x8A00;&#x5219;&#x66F4;&#x662F;&#x8BA9;Java&#x9526;&#x4E0A;&#x6DFB;&#x82B1;&#x3002;Groovy&#x7684;&#x5E94;&#x7528;&#x8303;&#x56F4;&#x4E5F;&#x662F;&#x6781;&#x4E3A;&#x5E7F;&#x6CDB;&#x7684;&#x3002;&#x6BD4;&#x5982;&#x8BF4;&#x6211;&#x4EEC;&#x521A;&#x624D;&#x63D0;&#x5230;&#x7684;Groovy&#x7F16;&#x5199;nGrinder&#x811A;&#x672C;&#x3001;Gradle&#x6784;&#x5EFA;&#x5DE5;&#x5177;&#x7B49;&#x7B49;&#x3002;&#x4E0D;&#x4E00;&#x800C;&#x8DB3;&#x3002;&#x56E0;&#x6B64;&#xFF0C;&#x6211;&#x89C9;&#x5F97;&#x6211;&#x4EEC;&#x6709;&#x5FC5;&#x8981;&#x7B80;&#x5355;&#x7684;&#x4E86;&#x89E3;&#x4E0B;Groovy&#x8FD9;&#x95E8;&#x8BED;&#x8A00;&#x3002;&#x56E0;&#x4E3A;&#x5176;&#x4E0E;Java&#x7684;&#x5B8C;&#x5168;&#x517C;&#x5BB9;&#xFF0C;&#x5176;&#x5B66;&#x4E60;&#x7684;&#x6210;&#x672C;&#x4E5F;&#x4E0D;&#x662F;&#x5F88;&#x9AD8;&#x3002;&#x4F46;&#x662F;&#x60F3;&#x8981;&#x719F;&#x7EC3;&#x7684;&#x638C;&#x63E1;&#x5176;&#x5B9E;&#x8FD8;&#x662F;&#x6709;&#x4E00;&#x5B9A;&#x7684;&#x96BE;&#x5EA6;&#x7684;&#x3002;</p>
<h3 id="&#x5173;&#x4E8E;groovy&#x548C;java&#x7684;&#x5173;&#x7CFB;">&#x5173;&#x4E8E;Groovy&#x548C;Java&#x7684;&#x5173;&#x7CFB;</h3>
<p>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#x5B9E;&#x9645;&#x4E0A;&#x6700;&#x8FD1;&#x5728;&#x4E0D;&#x5C11;&#x5730;&#x65B9;&#x90FD;&#x542C;&#x5230;&#x8BF4;Groovy&#x7684;&#x597D;&#xFF0C;&#x517C;&#x5177;&#x52A8;&#x6001;&#x8BED;&#x8A00;&#x548C;Java&#x7684;&#x8BED;&#x6CD5;&#x7279;&#x6027;&#xFF0C;&#x8FD8;&#x6709;&#x51FD;&#x6570;&#x5F0F;&#x7F16;&#x7A0B;&#x7684;&#x5473;&#x9053;&#xFF0C;&#x5341;&#x5206;&#x9178;&#x723D;&#x3002;&#x5F88;&#x591A;&#x4EBA;&#x89C9;&#x5F97;Groovy&#x5927;&#x6709;&#x53D6;&#x4EE3;Java&#x4E4B;&#x52BF;&#x3002;&#x7136;&#x800C;&#xFF0C;&#x5728;&#x6211;&#x770B;&#x6765;&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x4E00;&#x53E5;&#x8BDD;&#x5373;&#x53EF;&#x53CD;&#x9A73;&#x6B64;&#x95F4;&#x8A00;&#x8BBA;&#x3002;&#x4F60;&#x77E5;&#x9053;&#x7684;&#xFF0C;&#x5DE5;&#x4F5C;&#x81F3;&#x4ECA;&#x4E00;&#x5E74;&#x534A;&#xFF0C;&#x6211;&#x6709;&#x4E00;&#x534A;&#x7684;&#x65F6;&#x95F4;&#x90FD;&#x5728;&#x505A;&#x91CD;&#x6784;&#x3002;&#x91CD;&#x6784;&#x7684;&#x662F;PHP&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x6211;&#x80FD;&#x5F97;&#x5230;&#x7684;&#x7ED3;&#x8BBA;&#x662F;&#x6CA1;&#x53D8;&#x91CF;&#x53EF;&#x4EE5;&#x968F;&#x4FBF;&#x5199;&#xFF0C;&#x6570;&#x7EC4;&#x80FD;&#x591F;&#x5305;&#x5BB9;&#x4E00;&#x5207;&#x3002;&#x5199;&#x7684;&#x65F6;&#x5019;&#x662F;&#x5F88;&#x723D;&#xFF0C;&#x4F46;&#x662F;&#x4E00;&#x65E6;&#x8F6F;&#x4EF6;&#x8150;&#x8D25;&#x5230;&#x4E00;&#x5B9A;&#x7684;&#x7A0B;&#x5EA6;&#xFF0C;&#x9700;&#x8981;&#x91CD;&#x6784;&#x7684;&#x65F6;&#x5019;&#x5C31;&#x6BD4;&#x8F83;&#x5C34;&#x5C2C;&#x4E86;&#x3002;&#x6B63;&#x6240;&#x8C13;&#x52A8;&#x6001;&#x4E00;&#x65F6;&#x723D;&#xFF0C;&#x91CD;&#x6784;&#x706B;&#x846C;&#x573A;&#x554A;&#xFF01;</p>
<p>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#x6B64;&#x65F6;&#x6211;&#x4EEC;&#x5C31;&#x53EF;&#x4EE5;&#x770B;&#x7684;&#x51FA;&#x6765;&#xFF0C;Groovy&#x66F4;&#x591A;&#x7684;&#x65F6;&#x5019;&#x5145;&#x5F53;&#x7684;&#x662F;&#x548C;python&#x7B49;&#x811A;&#x672C;&#x8BED;&#x8A00;&#x4E00;&#x6837;&#x7684;&#x89D2;&#x8272;&#x3002;&#x90A3;&#x5C31;&#x662F;&#x80F6;&#x6C34;&#x3002;&#x5F53;&#x7136;&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x80FD;&#x4FDD;&#x6301;&#x8DB3;&#x591F;&#x7684;&#x4EBA;&#x5458;&#x50A8;&#x5907;&#xFF0C;&#x7528;&#x5B83;&#x6765;&#x505A;&#x4E3B;&#x8981;&#x5F00;&#x53D1;&#x8BED;&#x8A00;&#x4E5F;&#x4E0D;&#x5931;&#x4E3A;&#x4E00;&#x79CD;&#x6BD4;&#x8F83;&#x597D;&#x7684;&#x9009;&#x62E9;&#x3002;&#x4F46;&#x524D;&#x63D0;&#x662F;&#x4E00;&#x5B9A;&#x9700;&#x8981;&#x8DB3;&#x591F;&#x7684;&#x4EBA;&#x5458;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../chapter-Grinder/nGrinderdevelop/" class="navigation navigation-prev " aria-label="Previous page:  nGrinder 脚本开发">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="groovyBase.html" class="navigation navigation-next " aria-label="Next page: Groovy基础指南 ">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Groovy教程 ","level":"1.5","depth":1,"next":{"title":"Groovy基础指南 ","level":"1.5.1","depth":2,"path":"chapter-Groovy/groovyBase.md","ref":"chapter-Groovy/groovyBase.md","articles":[]},"previous":{"title":" nGrinder 脚本开发","level":"1.4.2","depth":2,"path":"chapter-Grinder/nGrinderdevelop/README.md","ref":"chapter-Grinder/nGrinderdevelop/README.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"chapter-Groovy/README.md","mtime":"2018-12-17T07:47:58.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-12-17T09:36:56.241Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

